import request from '@/utils/request'

// 获取数据
export function getUser(params) {
  return request({
    url: '/sys/role',
    method: 'get',
    params
  })
}

// 新增数据
export function addUser(data) {
  return request({
    url: '/sys/role',
    method: 'post',
    data
  })
}

// 删除数据
export function delUser(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'delete'
  })
}

// 编辑数据
export function afterUser(data) {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'put',
    data
  })
}
